<?php
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\Course;
use yii\helpers\Html;
?>
  <!-- _piaofu 漂浮 -->
    <script type="text/javascript">
    function addEvent(obj, evtType, func, cap) {
        cap = cap || false;
        if (obj.addEventListener) {
            obj.addEventListener(evtType, func, cap);
            return true;
        } else if (obj.attachEvent) {
            if (cap) {
                obj.setCapture();
                return true;
            } else {
                return obj.attachEvent("on" + evtType, func);
            }
        } else {
            return false;
        }
    }
    function getPageScroll() {
        var xScroll, yScroll;
        if (self.pageXOffset) {
            xScroll = self.pageXOffset;
        } else if (document.documentElement && document.documentElement.scrollLeft) {
            xScroll = document.documentElement.scrollLeft;
        } else if (document.body) {
            xScroll = document.body.scrollLeft;
        }
        if (self.pageYOffset) {
            yScroll = self.pageYOffset;
        } else if (document.documentElement && document.documentElement.scrollTop) {
            yScroll = document.documentElement.scrollTop;
        } else if (document.body) {
            yScroll = document.body.scrollTop;
        }
        arrayPageScroll = new Array(xScroll, yScroll);
        return arrayPageScroll;
    }
    function GetPageSize() {
        var xScroll, yScroll;
        if (window.innerHeight && window.scrollMaxY) {
            xScroll = document.body.scrollWidth;
            yScroll = window.innerHeight + window.scrollMaxY;
        } else if (document.body.scrollHeight > document.body.offsetHeight) {
            xScroll = document.body.scrollWidth;
            yScroll = document.body.scrollHeight;
        } else {
            xScroll = document.body.offsetWidth;
            yScroll = document.body.offsetHeight;
        }
        var windowWidth, windowHeight;
        if (self.innerHeight) {
            windowWidth = self.innerWidth;
            windowHeight = self.innerHeight;
        } else if (document.documentElement && document.documentElement.clientHeight) {
            windowWidth = document.documentElement.clientWidth;
            windowHeight = document.documentElement.clientHeight;
        } else if (document.body) {
            windowWidth = document.body.clientWidth;
            windowHeight = document.body.clientHeight;
        }
        if (yScroll < windowHeight) {
            pageHeight = windowHeight;
        } else {
            pageHeight = yScroll;
        }
        if (xScroll < windowWidth) {
            pageWidth = windowWidth;
        } else {
            pageWidth = xScroll;
        }
        arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight)
        return arrayPageSize;
    }
    var AdMoveConfig = new Object();
    AdMoveConfig.IsInitialized = false;
    AdMoveConfig.ScrollX = 0;
    AdMoveConfig.ScrollY = 0;
    AdMoveConfig.MoveWidth = 0;
    AdMoveConfig.MoveHeight = 0;
    AdMoveConfig.Resize = function () {
        var winsize = GetPageSize();
        AdMoveConfig.MoveWidth = winsize[2];
        AdMoveConfig.MoveHeight = winsize[3];
        AdMoveConfig.Scroll();
    }
    AdMoveConfig.Scroll = function () {
        var winscroll = getPageScroll();
        AdMoveConfig.ScrollX = winscroll[0];
        AdMoveConfig.ScrollY = winscroll[1];
    }
    addEvent(window, "resize", AdMoveConfig.Resize);
    addEvent(window, "scroll", AdMoveConfig.Scroll);
    function AdMove(id) {
        if (!AdMoveConfig.IsInitialized) {
            AdMoveConfig.Resize();
            AdMoveConfig.IsInitialized = true;
        }
        var obj = document.getElementById(id);
        obj.style.position = "absolute";
        var W = AdMoveConfig.MoveWidth - obj.offsetWidth;
        var H = AdMoveConfig.MoveHeight - obj.offsetHeight;
        var x = W * Math.random(), y = H * Math.random();
        var rad = (Math.random() + 1) * Math.PI / 6;
        var kx = Math.sin(rad), ky = Math.cos(rad);
        var dirx = (Math.random() < 0.5 ? 1 : -1), diry = (Math.random() < 0.5 ? 1 : -1);
        var step = 1;
        var interval;
        this.SetLocation = function (vx, vy) { x = vx; y = vy; }
        this.SetDirection = function (vx, vy) { dirx = vx; diry = vy; }
        obj.CustomMethod = function () {
            obj.style.left = (x + AdMoveConfig.ScrollX) + "px";
            obj.style.top = (y + AdMoveConfig.ScrollY) + "px";
            rad = (Math.random() + 1) * Math.PI / 6;
            W = AdMoveConfig.MoveWidth - obj.offsetWidth;
            H = AdMoveConfig.MoveHeight - obj.offsetHeight;
            x = x + step * kx * dirx;
            if (x < 0) { dirx = 1; x = 0; kx = Math.sin(rad); ky = Math.cos(rad); }
            if (x > W) { dirx = -1; x = W; kx = Math.sin(rad); ky = Math.cos(rad); }
            y = y + step * ky * diry;
            if (y < 0) { diry = 1; y = 0; kx = Math.sin(rad); ky = Math.cos(rad); }
            if (y > H) { diry = -1; y = H; kx = Math.sin(rad); ky = Math.cos(rad); }
        }
        this.Run = function () {
            var delay = 10;
            interval = setInterval(obj.CustomMethod, delay);
            obj.onmouseover = function () { clearInterval(interval); }
            obj.onmouseout = function () { interval = setInterval(obj.CustomMethod, delay); }
        }
    }
</script>


  <!-- header 开始 -->
<script type="text/javascript" src="js/jquery.flexslider-min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.flexslider').flexslider({
            directionNav: true,
            pauseOnAction: false
        });
    });
</script>
<?= \Yii::$app->view->renderFile('@app/views/layouts/header.php'); ?>
<div class="clear"></div>
<!--header 结束-->
  <!-- header 结束 -->  

<div class="sy_main">
<div class="wrapin">
<div class="sy_main3">
<div class="sy_main2">
<!--sy_main2 结束-->
<div class="sy_left">
<div class="sy_dwgk">
<dl><a href="<?= Url::to(['/site/show', 'id' => 2])?>" >
<dt><img src="images/sy_1.png" width="136" height="78" /></dt>
<dd><img src="images/sy_01.png" width="136" height="78" /></dd>
</a></dl>
<dl><a href="<?= Url::to(['/site/lead'])?>">
<dt><img src="images/sy_2.png" width="136" height="78" /></dt>
<dd><img src="images/sy_02.png" width="136" height="78" /></dd>
</a></dl>
<dl><a href="<?= Url::to(['/site/show', 'id' => 14])?>">
<dt><img src="images/sy_3.png" width="136" height="78" /></dt>
<dd><img src="images/sy_03.png" width="136" height="78" /></dd>
</a></dl>
<dl><a href="/leader2.aspx?category_id=5">
<dt><img src="images/sy_4.png" width="136" height="78" /></dt>
<dd><img src="images/sy_04.png" width="136" height="78" /></dd>
</a></dl>
</div>
<div class="clear"></div>
<!--sy_dwgk 结束-->

<div class="sy_yanjiu">
<div class="clear"></div>

<ul class="list-group" style="font-size:14px">
    <li class="list-group-item list-group-item-warning"><span class="glyphicon glyphicon-earphone" aria-hidden="true"></span> 招生热线<br>0578-2682232、2311236、2786713</li>
    <li class="list-group-item list-group-item-warning"><span class="glyphicon glyphicon-earphone" aria-hidden="true"></span> 投拆热线<br>0578-2138858</li>
    <li class="list-group-item list-group-item-warning"><span class="glyphicon glyphicon-earphone" aria-hidden="true"></span> 松阳分校报名热线<br>0578-8011199</li>
    <li class="list-group-item list-group-item-warning"><span class="glyphicon glyphicon-earphone" aria-hidden="true"></span> 龙泉分校报名热线<br>0578-7227001</li>
    <li class="list-group-item list-group-item-warning"><span class="glyphicon glyphicon-map-marker" aria-hidden="true"></span> 学校地址<br>丽水市莲都区吕埠坑2号（汽车西站对面）</li>
</ul>

</div>
<div class="clear"></div>
<!--sy_yanjiu 结束-->



</div>
<!--sy_left 结束-->
<div class="sy_right">
<div class="sy_news">
<div class="sy_news_title">
<dl><dt>学校动态</dt>
<dd><a href="http://www.lssqx.com/site/page-list?id=2"><img src="images/sy_more.png" width="60" height="20" /></a></dd>
</dl>
</div>
<div class="sy_news_main">
<div class="sy_news_left">

<!--取得一个分页DataTable-->

<a href="http://www.lssqx.com/site/page-list?id=2">
<img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG775.jpg?x-oss-process=image/resize,h_500" width="311" height="234" />
</a>

</div>
<div class="sy_news_right">

<!--取得一个分页DataTable-->


<?php foreach ($news as $val) {?>
<li><a href="<?= Url::to(['/site/show', 'id' => $val->id])?>">> <?= mb_substr($val['title'], 0, 30)?> <?= mb_strlen($val['title'], 'utf8') > 30  ? '...' : ''?></a></li>
<?php }?>

</div>
</div>

</div>
<div class="clear"></div>
<!--sy_news 结束-->

<div class="">
<div class="">
<div class="sy_kydt_title sy_kydt_title2"><dl><dt>课程班级</dt><dd><a href="http://www.lssqx.com/course">更多>></a></dd></dl></div>
<div class="sy_kydt_main">
  <div class="row">
    <?php foreach($course as $v) {?>
    <div class="col-sm-6 col-md-4">
        <div class="thumbnail">
        <img style="height:130px;" src="<?= $v['thumb']?>" alt="...">
            <div class="caption">
            <h3 class="text-center text-danger"><?= $v->title?></h3>
            <p class="text-center">价格：<strong class="text-danger"><?= $v->price?></strong> 元</p>
            <!--
                <p><a href="#" class="btn btn-primary btn-block" data-toggle="modal" data-target="#myModal">我要报名</a></p>
            -->
            </div>
        </div>
    </div>
    <?php }?>
  </div>

</div>
</div>

</div>



<div class="clear"></div>
<!--sy_kydt 结束-->
<div class="sctp" style="margin-top:0px;">
<div class="sctp_title"><dl><dt>学校环境</dt><dd><a href="<?= Url::to(['/site/show', 'id' => 16])?>"><img src="images/sy_more.png" width="60" height="20" /></a></dd></dl></div>
<div class="sctp_main">
    <div id="marquee1">
    <ul>

<!--取得一个分页DataTable-->

<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG775.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG776.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG777.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG778.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG779.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG785.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG786.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>
<li><img src="https://lssqx.oss-cn-hangzhou.aliyuncs.com/image/WechatIMG792.jpg?x-oss-process=image/resize,h_200" width="169" height="129" /></li>

    </ul>
  </div>
  <div class="control">↓鼠标点击：<a href="javascript:void(0);" id="goL">左移一次</a> <a href="javascript:void(0);" id="goR">右移一次</a></div>
</div>
</div>

</div>

<!--sy_right 结束-->
<!--sy_main2 结束-->
</div>
</div>
</div>
</div>



<?= \Yii::$app->view->renderFile('@app/views/layouts/footer.php'); ?>
